import {ResumeContext} from './MyContext'
import React from 'react';

class Child extends React.Component {
  constructor(props) {
    super(props);
  }
  state = {
    name: 'wangwu'
  }
  render() {
    return (
      <div>
        <ResumeContext.Consumer>
          {({name, id, val}) => (
            <div>
              <h1>{name}</h1>
              <h1>{id}</h1>
              <h1>Value: {val}</h1>
            </div>
          )}
        </ResumeContext.Consumer>
      </div>
    );
  }
}

export default Child;